﻿using DependencyAnalysis.DataModel;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace ArchitectureTests
{
    [TestClass]
    public class FindUnreferencedElementsTest : DependencyTest
    {
        [TestMethod]
        public void AnalysisAllPrivateMembersAreUsed()
        {
            Verifier.VerifyMembersAreUsed(DescriptorBuilder.BuildModuleDescriptor(
                    typeof(DependencyAnalysis.Properties.IAssemblyIdentifier).Assembly), NodeVisibility.Private);
        }

        [TestMethod]
        public void AnalysisAllInternalMembersAreUsed()
        {
            Verifier.VerifyMembersAreUsed(DescriptorBuilder.BuildModuleDescriptor(
                    typeof(DependencyAnalysis.Properties.IAssemblyIdentifier).Assembly), NodeVisibility.Internal);
        }

        [TestMethod]
        public void AnalysisAllProtectedMembersAreUsed()
        {
            Verifier.VerifyMembersAreUsed(DescriptorBuilder.BuildModuleDescriptor(
                    typeof(DependencyAnalysis.Properties.IAssemblyIdentifier).Assembly), NodeVisibility.Protected);
        }
    }
}
